package com.ruoyi.purchase.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.purchase.mapper.AcupointImagePurchaseMapper;
import com.ruoyi.purchase.domain.AcupointImagePurchase;
import com.ruoyi.purchase.service.IAcupointImagePurchaseService;

/**
 * 穴位图片购买记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-09
 */
@Service
public class AcupointImagePurchaseServiceImpl implements IAcupointImagePurchaseService 
{
    @Autowired
    private AcupointImagePurchaseMapper acupointImagePurchaseMapper;

    /**
     * 查询穴位图片购买记录
     * 
     * @param id 穴位图片购买记录主键
     * @return 穴位图片购买记录
     */
    @Override
    public AcupointImagePurchase selectAcupointImagePurchaseById(Long id)
    {
        return acupointImagePurchaseMapper.selectAcupointImagePurchaseById(id);
    }

    /**
     * 查询穴位图片购买记录列表
     * 
     * @param acupointImagePurchase 穴位图片购买记录
     * @return 穴位图片购买记录
     */
    @Override
    public List<AcupointImagePurchase> selectAcupointImagePurchaseList(AcupointImagePurchase acupointImagePurchase)
    {
        return acupointImagePurchaseMapper.selectAcupointImagePurchaseList(acupointImagePurchase);
    }

    /**
     * 新增穴位图片购买记录
     * 
     * @param acupointImagePurchase 穴位图片购买记录
     * @return 结果
     */
    @Override
    public int insertAcupointImagePurchase(AcupointImagePurchase acupointImagePurchase)
    {
        acupointImagePurchase.setCreateTime(DateUtils.getNowDate());
        return acupointImagePurchaseMapper.insertAcupointImagePurchase(acupointImagePurchase);
    }

    /**
     * 修改穴位图片购买记录
     * 
     * @param acupointImagePurchase 穴位图片购买记录
     * @return 结果
     */
    @Override
    public int updateAcupointImagePurchase(AcupointImagePurchase acupointImagePurchase)
    {
        acupointImagePurchase.setUpdateTime(DateUtils.getNowDate());
        return acupointImagePurchaseMapper.updateAcupointImagePurchase(acupointImagePurchase);
    }

    /**
     * 批量删除穴位图片购买记录
     * 
     * @param ids 需要删除的穴位图片购买记录主键
     * @return 结果
     */
    @Override
    public int deleteAcupointImagePurchaseByIds(Long[] ids)
    {
        return acupointImagePurchaseMapper.deleteAcupointImagePurchaseByIds(ids);
    }

    /**
     * 删除穴位图片购买记录信息
     * 
     * @param id 穴位图片购买记录主键
     * @return 结果
     */
    @Override
    public int deleteAcupointImagePurchaseById(Long id)
    {
        return acupointImagePurchaseMapper.deleteAcupointImagePurchaseById(id);
    }
}
